<div class="mondanos form">
    <?php echo $form->create('Mondano');?>
    <fieldset>
        <legend><?php __('Editar Perfil');?></legend>
        <?php
            echo $form->input('nome');
            echo $form->input('nick');
            echo $form->input('email', array('label'=>'E-mail'));
            echo $form->input('cidade');
            echo $form->input('profissao', array('label'=>'Profissão'));
            echo $form->input('sobre');
            echo $form->input('slug');
        ?>
    </fieldset>
    <?php 
        echo $form->end('Salvar');
    ?>
</div>
<div class="actions">
    <ul>
        <li><?php echo $html->link($html->image('list.png', array('alt' => __('Alterar Senha', true))), array('action' => 'alterar_senha','id'=>$form->value('Mondano.id')), null, false, false).' '.$html->link(__('Alterar Senha', true), array('action' => 'alterar_senha','id' => $form->value('Mondano.id')));?></li>
        <li><?php echo $html->link($html->image('list.png', array('alt' => __('Cancelar', true))), array('action' => 'index'), null, false, false).' '.$html->link(__('Cancelar', true), array('action' => 'perfil','id' => $form->value('Mondano.slug')));?></li>
    </ul>
</div>
<div class="related">
    <h3><?php __('Redes Sociais');?></h3>
    <?php if ($form->value('AplicativosUsuario')):?>
    <table cellpadding = "0" cellspacing = "0">
        <tr>
            <th><?php __('Nome'); ?></th>
            <th><?php __('Login'); ?></th>
            <th class="actions"><?php __('Ações');?></th>
        </tr>
            <?php
            $i = 0;
            foreach ($form->value('AplicativosUsuario') as $aplicativo):
                $class = null;
                if ($i++ % 2 == 0) {
                    $class = ' class="altrow"';
                }
                ?>
        <tr<?php echo $class;?>>
            <td><?php echo $aplicativo['Aplicativo']['nome'];?></td>
            <td><?php echo $aplicativo['login'];?></td>
            <td class="actions">
                <?php echo $html->link($html->image('edit.png', array('alt' => __('Editar', true))), array('controller'=>'aplicativos_usuarios','action' => 'edit', $aplicativo['id']), null, false, false); ?>
                <?php echo $html->link($html->image('delete.png', array('alt' => __('Excluir', true))), array('controller'=>'aplicativos_usuarios','action' => 'delete', $aplicativo['id']), null, sprintf(__('Você tem certeza que deseja excluir # %s?', true), $aplicativo['id']), false, false); ?>
            </td>
        </tr>
            <?php endforeach; ?>
    </table>
    <?php endif; ?>

    <div class="actions">
        <ul>
            <li><?php echo $html->link($html->image('add.png', array('alt' => __('Adicionar Aplicativo', true))), array('controller' => 'aplicativos_usuarios', 'action' => 'add', $form->value('Mondano.id')), null, false, false).' '.$html->link(__('Adicionar Aplicativo', true), array('controller' => 'aplicativos_usuarios', 'action' => 'add', $form->value('Mondano.id'))); ?> </li>
        </ul>
    </div>
</div>